package com.example.hzly.entity;

import javax.persistence.*;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.*;

@Data
@Entity
@Table(name = "story_tag")
@TableName("story_tag")
public class StoryTag {
    @Id
    @TableId(type = IdType.AUTO)
    private Long id;

    @Column(name = "story_id")
    private Long storyId;

    @Column(name = "tag_name")
    private String tagName;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "story_id", insertable = false, updatable = false)
    @TableField(exist = false)
    private Story story;
}